{% extends "base.html" %}
{% block title %}
    用户列表
{% endblock %}
{% block logo %}

        <span href="" class="dropdown-toggle"><i class="fa fa-user"></i>  {{ user.username }}
            <ul class="dropdown-menu">
                {% if user.is_staff %}
                <li><a href="/psw-modify/">修改密码</a></li>
                <li><a href="/user-list/">用户管理</a></li>
                 {% else %}
                    <li><a href="/psw-modify/">修改密码</a></li>
                {% endif %}
            </ul>
        </span> | <a href="/logout/">退出</a>
        <script type="text/javascript">
            $(function(){
                $(".dropdown-toggle").hover(function(){
                    $(".dropdown-menu").toggle();
                })
            })
        </script>

{% endblock %}
{% block content %}
    <div class="tools clearfix">
        <div class="sel-condition">
            管理用户
        </div>
        <div class="child-tools">
            <a href="/user-add/"><input type="button" value="添 加"></a>
        </div>
    </div>
    <div id="data_table" class="data-table">
        <table>
            <tr>
                <th><input type="checkbox" id="all_checked"  name="list"></th>
                <th>用户名</th>
                <th>密码</th>
{#                <th>权限</th>#}
                <th>操作</th>
            </tr>
            {% for user in users %}
            <tr>
                <td><input type="checkbox"  name="list" value="{{ user.id }}"></td>
                <td>{{ user.username }}</td>
                <td>{{ user.password }}</td>
{#                <td>1</td>#}
                <td><a href="/user-modify-list/{{ user.id }}">修改 / </a>
                    <a href="/user-delete-list/{{ user.id }}">删除</a></td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endblock %}
